

<div class="row">
    <div class="col-lg-12">
        <h1 class="page-header"><?php echo __('List of activites'); ?></h1>
    </div>
     
<div class="col-lg-6">   
              <div class="form-group input-group">
                    <a class="btn btn-success" href="<?php echo $this->Html->url(array('action' => 'add')); ?>"><?php echo __('Add Activity '); ?><i class="fa fa-plus"></i></a>
               </div>
    </div>
    <div class="col-lg-6">
 
                <div class="form-group input-group">
                    <input type="text" id='serach' class="form-control" placeholder='Search ...'>
                            <span class="input-group-btn">
                    <button class="btn btn-default" type="button"><i class="fa fa-search"></i></button>
                            </span>
                </div>

    </div> 



</div>



            <div class="row">
                <div class="col-lg-12">
                   

                 
<div class="panel panel-default">
    <div class="panel-heading">
                        	<?php echo __('List of activities'); ?>
    </div>
                        <!-- /.panel-heading -->
     <div class="panel-body">
                            <div class="table-responsive" id="searchByActivity">
                                <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                    <thead>
                                        <tr>
                                            
										<th><?php echo __('supplier'); ?></th>
										<th><?php echo __('suBcategory'); ?></th>
										<th><?php echo __('desciption'); ?></th>
										<th><?php echo __('ndays'); ?></th>
										<th><?php echo __('nnights'); ?></th>
										<th><?php echo __('adult_price'); ?></th>
										<th><?php echo __('child_price'); ?></th>
										<th><?php echo __('details'); ?></th>
										<th><?php echo __('pickup_point'); ?></th>
										<th><?php echo __('nhours'); ?></th>
										<th><?php echo __('lastviewed'); ?></th>
										<th><?php echo __('available'); ?></th>
										<th><?php echo __('rate'); ?></th>
										<th><?php echo __('ending'); ?></th>
										<th class="actions"><?php echo __('Actions'); ?></th>

                                        </tr>
                                    </thead>
                                    <tbody>
                              <?php foreach ($activities as $activity): ?>
                                        
        <tr class="gradeA">
        
					<td><?php echo h($activity['SubCategory']['label']); ?>&nbsp;</td>
					<td><?php echo h($activity['Supplier']['desc']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['description']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['ndays']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['nnights']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['adult_price']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['child_price']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['details']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['pickup_point']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['nhours']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['lastviewed']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['available']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['rate']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['ending']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['created']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['updated']); ?>&nbsp;</td>
					<td><?php echo h($activity['Activity']['deleted']); ?>&nbsp;</td>
					<td class="actions">
						<?php echo $this->Html->link(__('View'), array('action' => 'view', $activity['Activity']['id'])); ?>
						<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $activity['Activity']['id'])); ?>
						<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $activity['Activity']['id']), null, __('Are you sure you want to delete # %s?', $activity['Activity']['id'])); ?>
					</td>
	</tr>
<?php endforeach; ?>
                                    </tbody>
                                </table>
                                <?php echo  $this->element('paginate'); ?>
                            </div>
                            
                        </div>
                        <!-- /.panel-body -->
</div>

  
</div>
                <!-- /.col-lg-12 -->
 </div>

<script>
$("#serach").keyup(function(){

                var ninclude=$(this).val();
                var url = "activites/searchByActivity/"+ninclude;
                $("#searchByActivity").html('<div style="padding-top:20px;padding-bottom:20px;text-align:center;"><img src="img/load.gif"></div>');
                $.get(url, function(data) {
                     

                    $("#searchByActivity").html(data);
                });
            });

</script> 